The present invention relates to the processing of graphical elements in a computer-graphics illustration.
Computer-graphics illustrations are typically made up of a set of graphical elements of various types. Types of graphical elements include rasterized images, glyphs, vector strokes, vector fills, image masks, soft masks, and gradients. A graphical element typically includes a path, which defines the boundary of the graphical element. Graphical elements are typically handled as individual entities, and may interact with each other (e.g., by overlapping). Hereafter, any illustration discussed is a computer-graphics illustration unless otherwise noted.
When an illustration is printed, a printing device may print color in the illustration using multiple print units (e.g., individual printing plates in a multi-plate printing press). If the print units are not properly aligned, gaps can be formed between portions of the illustration having different colors. Gaps can also be formed if the medium on which the illustration is being printed shrinks or expands when ink is applied. To reduce the likelihood of gaps in a printed representation of an illustration, a process called trapping is used. Trapping involves creating traps—overlaps (spreads) or underlaps (chokes) of colors—prior to printing. A trapping process typically overlaps the colors of adjacent graphical elements selectively so that if the color of one graphical element is misaligned relative to the color of another graphical element during printing, the overlap will prevent the formation of an area between the graphical elements where no color is printed (a gap).
The rules used to trap an illustration depend on many factors, including the colors and types of the graphical elements being trapped. For example, when two images are trapped, centerline trapping (where a trap is centered on a border between two graphical elements) typically is used. When two vector graphical elements (e.g., vector fills) are trapped, the trap typically is located on one side of the border between the vector graphical elements. When a vector graphical element is trapped against an image, the trap location can be based on the color of the vector graphical element and the color of the image, or a user can specify the trap location so that the trap location does not change as the color of the image pixels changes. Traps between gradient graphical elements and other graphical elements can gradually move from one side of the boundary between graphical elements to the other as the color of the gradient changes. Lighter colors typically are spread or choked into darker colors. Trapping an illustration can be a time-consuming process. A computer program can be used to trap an illustration automatically. Automatic trapping typically involves a computer program trapping graphical elements in a computer-graphics illustration according to trapping rules that depend on the types of graphical elements involved.